<!-- 投递记录列表组件 -->
<template>
	<view class="list">
		<view class="item">
			<view class="top flex justify-between align-center">
				<view class="name" :class="item.positionType==1?'color':''">
					{{item.positionName}}
				</view>
				<view class="pay" :class="item.positionType==1?'color':''">
					{{item.positionType==1?'停止招聘':item.positionLower + 'k - ' + item.positionUpper + 'k'}}
				</view>
			</view>
			<view class="center flex justify-between align-center">
				<view class="company" :class="item.positionType==1?'color':''">
					{{item.companyName}}
				</view>
				<view class="city" :class="item.positionType==1?'color':''">
					{{item.companyCity}}　{{item.companyPlace}}
				</view>
			</view>
			<slot></slot>
			<view class="bom flex justify-between align-center">
				<view class="left flex align-center">
					<view class="icon flex justify-center align-center">
						<image
							:src="item.avatar"
							mode=""></image>
					</view>
					<view class="text" :class="item.positionType==1?'color':''">
						{{item.nickname}}
					</view>
				</view>
				<slot name="right"></slot>
			</view>
		</view>
		<view class="li">

		</view>
	</view>
</template>

<script>
	export default {
		name: "deliveryList",
		props:{
			item: Object,
			status: Number
		},
		data() {
			return {

			};
		},
		methods:{
			//点击事件
			linkDetail(item){
				switch (this.status) {
					case 0:
					case 1:
					case 2:
					case 3:
						if(item.status == 1){
							return
						}else{
							uni.setStorageSync('pageNum',this.item.positionListId)
							uni.navigateTo({
								url: '/pagesB/positionDetail/positionDetail'
							})
						}
						break;
					case 4:
						uni.navigateTo({
							url: '/pagesB/offerDetail/offerDetail?item=' + encodeURIComponent(JSON.stringify(item))
						})
						break;
				}
			}
		}
	}
</script>

<style lang="scss">
	.list {
		line-height: 1;

		.item {
			padding: 30rpx;

			.top {
				.name {
					font-weight: bold;
					color: #333333;
					font-size: 36rpx;
				}

				.pay {
					font-size: 36rpx;
					font-family: DIN;
					font-weight: 500;
					color: #0265EB;
				}
			}

			.center {
				margin: 30rpx 0;

				.company {
					font-weight: 400;
					color: #333333;
					font-size: 24rpx;
				}

				.city {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #666666;
				}
			}

			.bom {
				.left{
					.icon {
						width: 46rpx;
						height: 46rpx;
						border-radius: 50%;
						margin-right: 16rpx;
						overflow: hidden;
					}
					
					.text {
						font-weight: 500;
						color: #666666;
						font-size: 24rpx;
					}
				}
			}
		}

		.li {
			height: 20rpx;
			width: 100vw;
			background-color: #f8f8f8;
		}

		.color {
			color: #999999 !important;
		}
	}
</style>
